﻿SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
USE [master]
GO
IF EXISTS (SELECT name FROM sys.databases WHERE name=N'DataBaseHotel')
DROP DATABASE [DataBaseHotel]
IF DB_ID('DataBaseHotel') IS NULL BEGIN
   DECLARE @cmd nvarchar(500)
   SET @cmd = 'CREATE DATABASE [DataBaseHotel]'
   EXEC (@cmd)
END 
GO
EXEC dbo.sp_dbcmptlevel @dbname = 'DataBaseHotel',@new_cmptlevel=90
GO
IF (1= FULLTEXTSERVICEPROPERTY ('IsFullTextInstalled'))
BEGIN
EXEC [DataBaseHotel].[dbo].[sp_fulltext_database] @action = 'enable'
END
GO  
ALTER DATABASE [DataBaseHotel] SET ANSI_NULL_DEFAULT OFF 
GO
ALTER DATABASE [DataBaseHotel] SET ANSI_NULLS OFF 
GO
ALTER DATABASE [DataBaseHotel] SET ANSI_PADDING OFF 
GO
ALTER DATABASE [DataBaseHotel] SET ANSI_WARNINGS OFF 
GO
ALTER DATABASE [DataBaseHotel] SET ARITHABORT OFF 
GO
ALTER DATABASE [DataBaseHotel] SET AUTO_CLOSE OFF 
GO
ALTER DATABASE [DataBaseHotel] SET AUTO_CREATE_STATISTICS ON 
GO
ALTER DATABASE [DataBaseHotel] SET AUTO_SHRINK OFF 
GO
ALTER DATABASE [DataBaseHotel] SET AUTO_UPDATE_STATISTICS ON 
GO
ALTER DATABASE [DataBaseHotel] SET CURSOR_CLOSE_ON_COMMIT OFF 
GO
ALTER DATABASE [DataBaseHotel] SET CURSOR_DEFAULT  GLOBAL 
GO
ALTER DATABASE [DataBaseHotel] SET CONCAT_NULL_YIELDS_NULL OFF 
GO
ALTER DATABASE [DataBaseHotel] SET NUMERIC_ROUNDABORT OFF 
GO
ALTER DATABASE [DataBaseHotel] SET QUOTED_IDENTIFIER OFF 
GO
ALTER DATABASE [DataBaseHotel] SET RECURSIVE_TRIGGERS OFF 
GO
ALTER DATABASE [DataBaseHotel] SET  ENABLE_BROKER 
GO
ALTER DATABASE [DataBaseHotel] SET AUTO_UPDATE_STATISTICS_ASYNC OFF 
GO
ALTER DATABASE [DataBaseHotel] SET DATE_CORRELATION_OPTIMIZATION OFF 
GO
ALTER DATABASE [DataBaseHotel] SET TRUSTWORTHY OFF 
GO
ALTER DATABASE [DataBaseHotel] SET ALLOW_SNAPSHOT_ISOLATION OFF 
GO
ALTER DATABASE [DataBaseHotel] SET PARAMETERIZATION SIMPLE 
GO
ALTER DATABASE [DataBaseHotel] SET  READ_WRITE 
GO
ALTER DATABASE [DataBaseHotel] SET RECOVERY SIMPLE 
GO
ALTER DATABASE [DataBaseHotel] SET  MULTI_USER 
GO
ALTER DATABASE [DataBaseHotel] SET PAGE_VERIFY CHECKSUM  
GO
ALTER DATABASE [DataBaseHotel] SET DB_CHAINING OFF 

--tablas--
--tabla administrador operador--
USE [DataBaseHotel]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Administrator](
	[UserName] [nvarchar](50) COLLATE Modern_Spanish_CI_AS NOT NULL,
	[Password] [nvarchar](50) COLLATE Modern_Spanish_CI_AS NOT NULL,
	[FullName] [nvarchar](50) COLLATE Modern_Spanish_CI_AS NOT NULL,
	[Surname] [nvarchar](50) COLLATE Modern_Spanish_CI_AS NOT NULL,
	[Email] [nvarchar](50) COLLATE Modern_Spanish_CI_AS NOT NULL,
 CONSTRAINT [PK_Administrator] PRIMARY KEY CLUSTERED 
(
	[UserName] ASC,
	[Password] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
--table employee
USE [DataBaseHotel]
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Employee](
	[CI] [nvarchar](50) NOT NULL,
	[Name] [nvarchar](50) NULL,
	[Surname] [nvarchar](50) NULL,
	[WorkArea] [nvarchar](50) NULL,
	[Telephone] [nvarchar](50) NULL,
	[Email] [nvarchar](50) NULL,
	[Address] [nvarchar](50) NULL,
 CONSTRAINT [PK_Employee] PRIMARY KEY CLUSTERED 
(
	[CI] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

--tabla Product

USE [DataBaseHotel]
GO
/****** Objeto:  Table [dbo].[Product]    Fecha de la secuencia de comandos: 03/11/2011 09:21:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Product](
	[IdProduct] [nvarchar](50) NOT NULL,
	[Group] [nvarchar](50) COLLATE Modern_Spanish_CI_AS NOT NULL,
	[NameProduct] [nvarchar](50) COLLATE Modern_Spanish_CI_AS NOT NULL,
	[CostBuy] [float]  NOT NULL,
   	[CostSale] [float]  NOT NULL,
	[Amount][int] NOT NULL,
	[Date][nvarchar](50) NOT NULL,

 CONSTRAINT [PK_Product] PRIMARY KEY CLUSTERED 
(
	[IdProduct] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

--tabla Sale

USE [DataBaseHotel]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Sale](
	[IdSale] [int]  IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,	
	[id] [nvarchar](50)  NOT NULL,
	[Room] [nvarchar](10) NOT NULL,	
   	[CostSaleProducts] [float] NOT NULL,
	[Description] [nvarchar](400) NOT NULL,
	[DateOfSale] [DateTime] DEFAULT '0000/00/00 00:00:00' NOT NULL,
 CONSTRAINT [PK_Sale] PRIMARY KEY CLUSTERED 
(
	[IdSale] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
---DES ----
CREATE TABLE [dbo].[Encrip](
    [UserName] [nvarchar](50) NOT NULL,
	[IV] [nvarchar](2000) COLLATE Modern_Spanish_CI_AS NOT NULL,
	[KEY] [nvarchar](2000) COLLATE Modern_Spanish_CI_AS NOT NULL,
	[Encriptado] [nvarchar](2000) COLLATE Modern_Spanish_CI_AS NOT NULL,
 CONSTRAINT [PK_Encrip] PRIMARY KEY CLUSTERED 
(
[UserName] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
--fin DES--


--insersiones--
INSERT INTO [DataBaseHotel].[dbo].[Product]([IdProduct],[Group],[NameProduct],[CostBuy],[CostSale],[Amount],[Date])
			VALUES ('P00012345','lacteos','leche pil',5.5,6,15,'viernes, 06 de mayo de 2011')
INSERT INTO [DataBaseHotel].[dbo].[Product]([IdProduct],[Group],[NameProduct],[CostBuy],[CostSale],[Amount],[Date])
			VALUES ('P00012346','lacteos','leche Chocolatada',6,7,10,'viernes, 06 de mayo de 2011')
INSERT INTO [DataBaseHotel].[dbo].[Product]([IdProduct],[Group],[NameProduct],[CostBuy],[CostSale],[Amount],[Date])
			VALUES ('P00012347','Sodas','coca cola',10,12.5,50,'viernes, 06 de mayo de 2011')
INSERT INTO [DataBaseHotel].[dbo].[Product]([IdProduct],[Group],[NameProduct],[CostBuy],[CostSale],[Amount],[Date])
			VALUES ('P00012348','Dulces','papitas',1,2,50,'viernes, 06 de mayo de 2011')
INSERT INTO [DataBaseHotel].[dbo].[Product]([IdProduct],[Group],[NameProduct],[CostBuy],[CostSale],[Amount],[Date])
			VALUES ('P00012349','lacteos','leche de soya',3.50,4.5,10,'jueves, 06 de mayo de 2011')


--INSERT INTO [DataBaseHotel].[dbo].[Administrator] ([UserName],[Password],[FullName],[Surname],[Email])
			--VALUES('JuanPerez','abcD#123','Juan Carlos','Perez','juanPerez@gmail.com')
--INSERT INTO [DataBaseHotel].[dbo].[Administrator] ([UserName],[Password],[FullName],[Surname],[Email])
		--	VALUES('MiguelNogales','MN&&mig123','Miguel','Nogales','nogales@gmail.com')
INSERT INTO [DataBaseHotel].[dbo].[Administrator] ([UserName],[Password],[FullName],[Surname],[Email])
			VALUES('prueba','prueba','m','n','nogal@gmail.com')
INSERT INTO [DataBaseHotel].[dbo].[Administrator] ([UserName],[Password],[FullName],[Surname],[Email])
			VALUES('marietaGonzales','Abc#g167.','marieta','Gonzales','maru.@gmail.com')
INSERT INTO [DataBaseHotel].[dbo].[Employee]([CI],[Name],[Surname],[WorkArea],[Telephone],[Email],[Address])
		    VALUES ('77845498','Osmar','Chamvi','Lavanderia','445251','osmar@gmail.com','Av. San Carlos')
INSERT INTO [DataBaseHotel].[dbo].[Encrip] ([UserName],[IV], [KEY],[Encriptado])
       VALUES('prueba','7eYvBj9JfcI=','QwYuZmTW10QbKpIzTD//kj4QaBhZVbQs','7Or+17+1pX8=')
INSERT INTO [DataBaseHotel].[dbo].[Encrip] ([UserName],[IV], [KEY],[Encriptado])
       VALUES('marietaGonzales','81A/NJoekEc=','czOXiLD2+mst6SyZ8H8ieTlDh1+CccSa','eqSnvOFXnILebJA/5XJiHA==')
--tabla cliente


USE [DataBaseHotel]
GO
/****** Objeto:  Table [dbo].[Client]    Fecha de la secuencia de comandos: 04/18/2011 11:48:02 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Client](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[FullName] [varchar](50) COLLATE Modern_Spanish_CI_AS NOT NULL,
	[ClientId] [varchar](50) COLLATE Modern_Spanish_CI_AS NOT NULL,
	[Telephone] [varchar](50) COLLATE Modern_Spanish_CI_AS NULL,
	[Cellphone] [varchar](50) COLLATE Modern_Spanish_CI_AS NULL,
	[Email] [varchar](50) COLLATE Modern_Spanish_CI_AS NULL,
	[Organization] [varchar](50) COLLATE Modern_Spanish_CI_AS NULL,
	[Fax] [varchar](50) COLLATE Modern_Spanish_CI_AS NULL,
 	[Gender] [varchar](50) COLLATE Modern_Spanish_CI_AS NULL,
 	[Birthday][varchar](50) COLLATE Modern_Spanish_CI_AS NULL,
	[Country] [varchar](50) COLLATE Modern_Spanish_CI_AS NULL,
 CONSTRAINT [PK_Client] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF

--datos cliente


INSERT INTO [DataBaseHotel].[dbo].[Client]
           ([FullName]
           ,[ClientId]
           ,[Telephone]
           ,[Cellphone]
           ,[Email]
           ,[Organization]
           ,[Fax]
           ,[Gender]
           ,[Birthday]
           ,[Country])
     VALUES
           ('Daniel Rocabado'
           ,'12345'
           ,'4412345'
           ,'72212345'
           ,'danrocar@hotmail.com'
           ,'UCB'
           ,'4467890'
           ,'M'
           ,'22/06/1987 0:00:00'
           ,'Bolivia')

INSERT INTO [DataBaseHotel].[dbo].[Client]
           ([FullName]
           ,[ClientId]
           ,[Telephone]
           ,[Cellphone]
           ,[Email]
           ,[Organization]
           ,[Fax]
           ,[Gender]
           ,[Birthday]
           ,[Country])
     VALUES
           ('Miguel Nogales'
           ,'123'
           ,'4243248'
           ,'72263636'
           ,'miguel@hotmail.com'
           ,'UCB'
           ,'543534'
           ,'M'
           ,'10/06/1989 0:00:00'
           ,'Bolivia')

---Marieta---
USE [DataBaseHotel]
GO
/****** Object:  Table [dbo].[room]    Script Date: 03/09/2011 14:59:44 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[room]') AND type in (N'U'))
DROP TABLE [dbo].[room]
GO
/****** Object:  Table [dbo].[Type]    Script Date: 03/09/2011 14:59:44 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Type]') AND type in (N'U'))
DROP TABLE [dbo].[Type]
GO
/****** Object:  Table [dbo].[Type]    Script Date: 03/09/2011 14:59:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Type]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Type](
	[idType] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](max) NOT NULL,
	[Price] [decimal](18, 2) NOT NULL,
 CONSTRAINT [PK_Type] PRIMARY KEY CLUSTERED 
(
	[idType] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[room]    Script Date: 03/09/2011 14:59:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[room]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[room](
	[idRoom] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
	[Name] [nvarchar](max) NOT NULL,
	[idType] [int] NOT NULL,
 CONSTRAINT [PK_room] PRIMARY KEY CLUSTERED 
(
	[idRoom] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
INSERT INTO [DataBaseHotel].[dbo].[Type]
           ([Name]
           ,[Price])
     VALUES
           ('Simple'
           ,50.00)
GO
INSERT INTO [DataBaseHotel].[dbo].[Type]
           ([Name]
           ,[Price])
     VALUES
           ('Doble'
           ,100.00)
GO
INSERT INTO [DataBaseHotel].[dbo].[Type]
           ([Name]
           ,[Price])
     VALUES
           ('Triple'
           ,150.00)
GO
INSERT INTO [DataBaseHotel].[dbo].[Type]
           ([Name]
           ,[Price])
     VALUES
           ('Matrimonial'
           ,175.00)
GO
USE [DataBaseHotel]
GO
/****** Object:  Table [dbo].[Booking]    Script Date: 03/09/2011 14:59:44 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Booking]') AND type in (N'U'))
DROP TABLE [dbo].[Booking]
GO
/****** Object:  Table [dbo].[Booking]    Script Date: 03/09/2011 14:59:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Booking]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Booking](
	[idBooking] [int] IDENTITY(1,1) NOT NULL,
	[CheckIn] [DateTime] DEFAULT '0000/00/00 00:00:00' NOT NULL,
	[CheckOut] [DateTime] DEFAULT '0000/00/00 00:00:00' NOT NULL,
	[ClientCI] [int] NOT NULL,
	[idRoom][int] NOT NULL,
 CONSTRAINT [PK_Booking] PRIMARY KEY CLUSTERED 
([idBooking] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

END

INSERT INTO [DataBaseHotel].[dbo].[room]([name],[idType])VALUES ('a20','1');
INSERT INTO [DataBaseHotel].[dbo].[room]([name],[idType])VALUES ('a21','2');
INSERT INTO [DataBaseHotel].[dbo].[room]([name],[idType])VALUES ('a22','3');
INSERT INTO [DataBaseHotel].[dbo].[room]([name],[idType])VALUES ('a23','4');
INSERT INTO [DataBaseHotel].[dbo].[room]([name],[idType])VALUES ('a24','1');
INSERT INTO [DataBaseHotel].[dbo].[room]([name],[idType])VALUES ('a25','2');
INSERT INTO [DataBaseHotel].[dbo].[room]([name],[idType])VALUES ('a26','3');
INSERT INTO [DataBaseHotel].[dbo].[room]([name],[idType])VALUES ('b20','4');
INSERT INTO [DataBaseHotel].[dbo].[room]([name],[idType])VALUES ('b21','1');
INSERT INTO [DataBaseHotel].[dbo].[room]([name],[idType])VALUES ('b22','2');
INSERT INTO [DataBaseHotel].[dbo].[room]([name],[idType])VALUES ('b23','3');
INSERT INTO [DataBaseHotel].[dbo].[room]([name],[idType])VALUES ('b24','4');
INSERT INTO [DataBaseHotel].[dbo].[room]([name],[idType])VALUES ('b25','2');


--tabla tokenrooms--
USE [DataBaseHotel]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[TokenRooms](
	[idRoom] [int] NOT NULL,
	[ClientCI] [varchar](50) COLLATE Modern_Spanish_CI_AS NOT NULL,
	[CheckIn] [datetime] DEFAULT '0000/00/00 00:00:00' NOT NULL,
	[CheckOut] [datetime] DEFAULT '0000/00/00 00:00:00' NOT NULL,
 CONSTRAINT [PK_TokenRooms] PRIMARY KEY CLUSTERED 
(
	[idRoom] ASC,
	[ClientCI] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF

INSERT INTO [DataBaseHotel].[dbo].[TokenRooms] ([idRoom],[ClientCI],[CheckIn],[CheckOut])
			VALUES(2,'12345','2011/04/05 00:00:00.000','2011/05/05 00:00:00.000')
INSERT INTO [DataBaseHotel].[dbo].[TokenRooms] ([idRoom],[ClientCI],[CheckIn],[CheckOut])
			VALUES(1,'12345','2011/27/05 00:00:00.000','2011/10/06 00:00:00.000')
INSERT INTO [DataBaseHotel].[dbo].[TokenRooms] ([idRoom],[ClientCI],[CheckIn],[CheckOut])
			VALUES(2,'12345','2011/28/05 00:00:00.000','2011/30/05 00:00:00.000')


--table pagos--
USE [DataBaseHotel]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Pagos](
	[Id] [int] NOT NULL,
	[fecha] [datetime] NOT NULL,
	[Client] [nvarchar](50) NOT NULL,
	[Monto] [nvarchar](50) NOT NULL,
 CONSTRAINT [PK_Pagos] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

--table invoice---

USE [DataBaseHotel]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Invoice](
	[Nro] [nvarchar](50) NOT NULL,
	[FullName] [nvarchar](50) NOT NULL,
	[NIT/CI] [nvarchar](50) NOT NULL,
	[Date] [datetime] NOT NULL,
 CONSTRAINT [PK_Invoice] PRIMARY KEY CLUSTERED 
(
	[Nro] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

--invoice detail--
USE [DataBaseHotel]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[InvoiceDetail](
	[Nro] [nvarchar](50) NOT NULL,
	[Detail] [nvarchar](50) NOT NULL,
	[Mount] [nvarchar](50) NOT NULL
) ON [PRIMARY]

-- pagos de clientes por habitacion....
CREATE TABLE [dbo].[PayRooms](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[IdClient] [nvarchar](50) NULL,
	[Date] [datetime] NULL,
	[price] [decimal](18, 2) NULL,
 CONSTRAINT [PK_PayRooms] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
--privilegio de usuario: Secretaria...
USE [DataBaseHotel]
GO

/****** Object:  Table [dbo].[Secretary]    Script Date: 12/16/2012 6:38:12 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Secretary](
	[UserName] [nvarchar](50) NOT NULL,
 CONSTRAINT [PK_Secretary] PRIMARY KEY CLUSTERED 
(
	[UserName] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
